home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group96a.txt
/
000140_icon-group-sender _Tue Jun 18 11:15:06 1996.msg
< prev
next >
Wrap
Internet Message Format
|
1996-09-05
|
2KB
Received: by cheltenham.cs.arizona.edu; Tue, 18 Jun 1996 13:13:27 MST
Message-Id: <199606181615.MAA06057@po_box.cig.mot.com>
Date: Tue, 18 Jun 1996 11:15:06 -0500
From: Tony J Yeates <yeates@cig.mot.com>
In-Reply-To: Hamish Lawson <H.Lawson@tees.ac.uk>
"Re: Locking files" (Jun 18, 1:11pm)
References: <9606140653.AA00140@canardo.unicaen.fr>
<199606181601.MAA05191@po_box.cig.mot.com>
X-Mailer: Z-Mail (3.2.1 10apr95)
To: Hamish Lawson <H.Lawson@tees.ac.uk>, icon-group@cs.arizona.edu
Subject: Re: Locking files
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Errors-To: icon-group-errors@cs.arizona.edu
Status: O
On Jun 18, 1:11pm, Hamish Lawson wrote:
> Subject: Re: Locking files
> Jerzy Karczmarczuk wrote:
>
> > there is a cheap way of locking something
> > globally used for ages: the *creation* of a special "lock" file
> > just before entering the critical section (if it is absent,
> > otherwise sleep/wait), and the destruction after.
>
> Is there not a small risk that in the time between some process finding
> that the lock file doesn't exist and creating this file, another process
> might also find that the lock file doesn't exist, thereby breaking the
> exclusivity mechanism.
>
> | Hamish Lawson, School of Computing and Mathematics,
> | University of Teesside, Middlesbrough, Cleveland, UK, TS1 3BA
> | Tel: +44 1642 212695 Fax: +44 1642 342604
> | E-mail: H.Lawson@tees.ac.uk
>
>-- End of excerpt from Hamish Lawson
Hopefully the OS would enforce:
1) uniqueness of a filename within a directory (normal but nes. true
for all conceivable OS's I guess)
2) atomic file creation.